import {Action} from '@ngrx/store';
import {NetworkState} from '../reducers/network.reducer';

export enum ActionTypes {
  Connect = '[Network Status] Connect',
  Disconnect = '[Network Status] Disconnect'
}

export class Connect implements Action {
  readonly type = ActionTypes.Connect;

  constructor(public payload: NetworkState) {
  }
}

export class Disconnect implements Action {
  readonly type = ActionTypes.Disconnect;

  constructor(public payload: NetworkState) {
  }
}

export type ActionTypeUnion = Connect | Disconnect;
